<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="../../common.jsp"%>
<link rel="stylesheet" href="${staticPath}/css/pub.css" />
<title>商品分类品牌</title>
<style type="text/css">
<!--
.hidden_ul {
	display: none;
}

.show_ul {
	display: block;
}

.mg-auto a {
	width: 100%;
	height: 100%;
	border: none;
	text-decoration: none;
	color: inherit;
}
.mg-auto li a .goods_link{
	width:50%;
	float: left;
}
#right_Menu a{
	height: 70px;
	line-height: 70px;
	border-bottom: 1px  gray dashed;
	/*float: left;*/
}
#right_Menu a.img_link {
	width:30%;
}
#right_Menu a.text_link {
	width:70%;
}
#right_Menu .right-li a img{
	/*height: 60px;*/
	width: 70%;
	border: none;
}
#right_Menu li {
	margin: 0 10px;
}
#right_Menu .right-li a.img_link{
	border-bottom: none;
	width: 50%;
	display: inline-block;
	text-align: center;
}
#right_Menu .normal-li a.img_link{
	padding:4% 0;
	width:100%;
	border-bottom: 1px  gray dashed;
	display: inline-block;
	text-align: center;
}
.normal-li a img{
	height: 100%;
	width:auto;
	float:  none;
	display: inline;
}
.right-li a img{
	float:  none;
	display: inline;
}
-->
</style>
</head>
<body>
	<header class="OldHeader" >
		<div class="OHeader">
			<h1>商品分类</h1>
			<div class="OHeadBack">
				<a href="javascript:history.go(-1);" ><img src="${staticPath}/images/back.png" style="margin: auto;"></a>
			</div>
		</div>
	</header>
	<div class="weui_search_bar" id="search_bar" >
	  <form class="weui_search_outer" action="<%=appPath%>/goods/findPageResult.html" onsubmit="javascript:toSearch();">
	    <div class="weui_search_inner" >
	      <i class="weui_icon_search"></i>
	      <input type="search" name="keyWord" class="weui_search_input" id="search_input" placeholder="搜索" required />
	      <a href="javascript:" class="weui_icon_clear" id="search_clear"></a>
	    </div>
	    <label for="search_input" class="weui_search_text" id="search_text">
	      <i class="weui_icon_search"></i>
	      <span>搜索</span>
	    </label>
	  </form>
	  <a href="javascript:" class="weui_search_cancel" id="search_cancel">取消</a>
	</div>
	<div class="mg-auto overflow">
		<input type="hidden" id="selected_class_id" value="${selectedClassId}"/>
		<!--菜单-->
		<div class="Menu_box">
			<!---------左侧菜单---------->
			<div id="left_Menu">
				<div class="ot-menu" id="scroller">
					<ul>
						<li class="${'-1'==selectedClassId?'active':''}" cateId="-1"><a href="javascript:void(0);" >合作品牌</a></li>
						<c:forEach items="${resultMap.parentId0}" var="topLevelClass" varStatus="index">
							<li class="${topLevelClass.id==selectedClassId?'active':''}" cateId="${topLevelClass.id}"><a href="javascript:void(0);" >${topLevelClass.name}</a></li>
						</c:forEach>
					</ul>
				</div>
			</div>
			<!---------右侧侧菜单---------->
			<div id="right_Menu">
				<div class="menutype" id="scroller2">
					<ul class="hidden_ul  ${'-1'==selectedClassId?'show_ul':''}" id="children_of_-1">
						<c:set var="breakLine" value="0"></c:set>
						<c:forEach items="${brandList}" var ="brand" varStatus="status">
							<li class="right-li">
								<a href="javascript:void(0);"  brandId="${brand.id}" class="brand_link img_link"><img class="lazy-img" data-original="${brand.logo}"></a>
								<%--
								<a href="javascript:void(0);"  brandId="${brand.id}" class="brand_link text_link">
									<span style="display: inline-block; line-height: 35px;">
										${brand.name}
									</span>
									</a>
								 --%>
							</li>
						</c:forEach>
					</ul>
				<c:forEach items="${resultMap.parentId0}" var="topLevelClass" varStatus="index">
					<ul class="hidden_ul ${topLevelClass.id==selectedClassId?'show_ul':''}" id="children_of_${topLevelClass.id}">
						<c:set var ="mapKey" value="parentId${topLevelClass.id}" />
						<c:set var="itemsLength" value="${fn:length(resultMap[mapKey])}"></c:set>
						<c:forEach items="${resultMap[mapKey]}" var ="childClass">
							<li class="${itemsLength>5?'right-li':'normal-li'}">
								<a href="javascript:void(0)"  class="goods_link img_link" cateId="${childClass.id}"><img class="lazy-img" data-original="${childClass.image}"></a>
								<%--
								<a href="javascript:void(0)"  class="goods_link text_link" cateId="${childClass.id}">${childClass.name}</a>
								 --%>
							</li>
						</c:forEach>
					</ul>
				</c:forEach>
				</div>
			</div>
		</div>
		<!--菜单end-->
	</div>
	<div id="space_footer_div"></div>
	<div class="weui_tabbar"  id="footer_div" style="position: fixed;bottom: 0;">
		<a href="javascript:gotoHtml('/index.html')" class="weui_tabbar_item">
			<div class="weui_tabbar_icon">
				<img src="${staticPath}/images/home.png" alt="">
			</div>
			<p class="weui_tabbar_label">首页</p>
		</a> 
		<a href="javascript:;" id="category_link" class="weui_tabbar_item weui_bar_item_on">
			<div class="weui_tabbar_icon">
				<img src="${staticPath}/images/sort2.png" alt="">
			</div>
			<p class="weui_tabbar_label">分类</p>
		</a> 
		<a href="javascript:;"  id="cart_link" class="weui_tabbar_item cart">
			<div class="weui_tabbar_icon">
				<img src="${staticPath}/images/shop.png" alt="">
			</div>
			<p class="weui_tabbar_label">购物车</p>
		</a> 
		<a href="javascript:;" id="mine_link" class="weui_tabbar_item">
			<div class="weui_tabbar_icon">
				<img src="${staticPath}/images/main2.png" alt="">
			</div>
			<p class="weui_tabbar_label">我的</p>
		</a> 
		<a  href="javascript:kefu();" class="weui_tabbar_item">
			<div class="weui_tabbar_icon">
				<img src="${staticPath}/images/service.png" alt="">
			</div>
			<p class="weui_tabbar_label">客服</p>
		</a>
	</div>
</body>
<script type="text/javascript" src="${staticPath}/weui/js/iscroll.js"></script>
<script src="${staticPath}/js/jquery.lazyload.js"></script>
<script type="text/javascript" src="${staticPath}/js/app/goods-class/list.js"></script>
</html>